<?php
require_once dirname(dirname(__FILE__)) . '/shared/config/config.php';
require_once DOCUMENT_ROOT . DIR_SHARED_API . 'api_booking.php';
require_once DOCUMENT_ROOT . DIR_INCLUDE . 'head_script.php';

$empty_load = filter_input(INPUT_POST, "empty_load");
$ticket_quantity = filter_input(INPUT_POST, "ticket_quantity");
$city_id = filter_input(INPUT_POST, "city_id");
$cinema_id = filter_input(INPUT_POST, "cinema_id");
?>


<label>Movie</label>
<?php
if (empty($empty_load)) {
    $list = api_booking::get_all_movies_by_filter($ticket_quantity, $city_id, $cinema_id);
}
?>
<div class="ui fluid selection dropdown">
    <div class="text">--Not Selected--</div>
    <i class="dropdown icon"></i>
    <input name="ddl_movie" onchange="filter_change_for_movie()" type="hidden" value="0">
    <div class="menu">
        <div class="item" data-value="0">--Not Selected--</div>
        <?php
        if (!empty($list) && count($list) > 0) {
            foreach ($list as $item) {
            ?>
            <div class="item" data-value="<?php echo $item['id']; ?>"><?php echo $item['title']; ?></div>
            <?php
            }
        }?>
    </div>
</div>
